﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace SocketService
{
    public static class StaticMethod
    {
        /// <summary>
        /// 发送消息
        /// </summary>
        /// <param name="socket"></param>
        /// <param name="msg"></param>
        public static void Send(this Socket socket,string msg)
        {
            byte[] buffer = Encoding.Default.GetBytes(msg);
            socket.Send(buffer);
        }
    }
}
